package com.oxygen.design.singleton.bean;

/**
 * @author wangjie
 * @title: SingleObjectHungry
 * @description: 饿汉式
 * @date 2022/3/30 10:01
 **/
public class SingleObjectHungry {

    private static SingleObjectHungry instance = new SingleObjectHungry();

    private SingleObjectHungry() {
    }

    public static SingleObjectHungry getInstance() {
        return instance;
    }

    public void showMessage() {
        System.out.println("Hello World!");
    }
}
